﻿using System.Data.Entity.ModelConfiguration;

namespace wh40klbModel.ModelConfiguration
{
    public class SpecialRuleConfiguration : EntityTypeConfiguration<SpecialRule>
    {
        public SpecialRuleConfiguration()
        {
            //Cle Primaire et table
            HasKey(s => s.Id);
            //Propriete
            Property(sr => sr.Name).IsRequired();
            Property(sr => sr.Description).IsOptional();
            //cle etrangere
            HasMany(sr => sr.Armies).WithMany(a => a.SpecialRules);
        }
    }
}
